package a.j.a;

import a.c.e;
import a.c.k;
import a.c.w;
import a.c.x;
import a.d.s;
import a.d.u;
import a.i.db;
import a.i.p;
import a.j.ld;
import a.j.qe;

import java.util.HashMap;
import java.util.Iterator;

public class g
{
  private a.j.g a;
  private j b;
  private k d;
  private k e;
  private k f;
  private k g;
  private k h;
  private HashMap i;
  private boolean j;
  public static int k;
  
  public g(a.j.g paramg)
  {
    this.a = paramg;
    this.b = j.a(paramg);
  }
  
  public boolean a()
  {
    return this.j;
  }
  
  public void a(boolean paramBoolean)
  {
    this.j = paramBoolean;
  }
  
  public void b()
  {
    int m = j.v;
    if (m == 0)
    {
      if (this.b != null)
      {
        this.d = this.a.c(i.c);
        this.e = this.a.c(i.a);
        this.f = this.a.c(i.b);
      }
    }
    else
    {
      if (m == 0) {
        if (this.d != null) {
          this.a.j(i.c);
        }
      }
      if (m == 0)
      {
        if (this.e != null) {
          this.a.j(i.a);
        }
        if (m != 0) {}
      }
      else
      {
        if (this.f != null) {
          this.a.j(i.b);
        }
        this.a.a(i.c, a(this.a));
        this.a.a(i.b, this.b.g());
      }
      this.a.a(i.a, this.b.f());
    }
  }
  
  protected k a(a.j.g paramg)
  {
    int m = j.v;
    boolean bool2 = j.u;
    k localk = this.b.h();
    if ((!a()) || ((m != 0) || (localk == null))) {
      return localk;
    }
    x localx = db.a();
    w localw = paramg.v();
    do
    {
      if (!localw.e()) {
        break;
      }
      e locale = localw.d();
      if ((m != 0) || (localk.getBool(locale))) {
        if (m != 0) {}
      }
      boolean bool1 = this.b.r(locale).k() > 0;
      localx.a(locale, bool1);
      localw.f();
    } while (!bool2);
    return localx;
  }
  
  public void c()
  {
    if (j.v == 0)
    {
      if (this.b != null) {
        this.g = this.a.c(i.d);
      }
    }
    else {
      this.a.a(i.d, new p()
      {
        private final u c = new u(15.0D, 15.0D, 15.0D, 15.0D);
        
        public Object get(Object paramAnonymousObject)
        {
          u localu = g.this.a(g.this.a, (e)paramAnonymousObject);
          if (j.v == 0) {
            if (localu == null) {
              return this.c;
            }
          }
          return localu;
        }
      });
    }
  }
  
  protected u a(a.j.g paramg, e parame)
  {
    ld localld = paramg.w(parame);
    b localb = localld.K();
    if (j.v == 0) {
      if (localb == null) {
        return null;
      }
    }
    return localb.g();
  }
  
  public void d()
  {
    if (j.v == 0)
    {
      if (this.b != null) {
        this.h = this.a.c(i.e);
      }
    }
    else {
      this.a.a(i.e, new a_(this.a));
    }
  }
  
  public void e()
  {
    int m = j.v;
    boolean bool2 = j.u;
    e locale;
    ld localld;
    b localb;
    boolean bool1;
    if (m == 0) {
      if (this.b != null)
      {
        localObject = this.b.e();
        do
        {
          do
          {
            do
            {
              do
              {
                do
                {
                  if (!((Iterator)localObject).hasNext()) {
                    break;
                  }
                  locale = (e)((Iterator)localObject).next();
                } while (!this.a.h(locale));
                localld = this.a.w(locale);
                localb = localld.K();
              } while ((m == 0) && (localb == null));
              bool1 = localb.e();
              if (m != 0) {
                break;
              }
            } while (!bool1);
            localb.a(false);
            localb.a(true);
          } while (m != 0);
        } while (!bool2);
      }
    }
    Object localObject = this.a.v();
    do
    {
      if (!((w)localObject).e()) {
        break;
      }
      locale = ((w)localObject).d();
      localld = this.a.w(locale);
      localb = localld.K();
      if (m == 0)
      {
        if (localb != null)
        {
          bool1 = localb.e();
          if (m != 0) {
            continue;
          }
          if (bool1)
          {
            localb.a(false);
            localb.a(true);
          }
        }
        ((w)localObject).f();
      }
    } while (!bool2);
  }
  
  public void f()
  {
    int m = j.v;
    boolean bool = j.u;
    if ((m != 0) || (this.b != null))
    {
      if (m == 0) {
        if (this.d == null)
        {
          if (m != 0) {
            break label63;
          }
          this.a.j(i.c);
          if (!bool) {
            break label62;
          }
        }
      }
      this.a.a(i.c, this.d);
      label62:
      label63:
      if (m == 0) {
        if (this.f == null)
        {
          if (m != 0) {
            break label106;
          }
          this.a.j(i.b);
          if (!bool) {
            break label105;
          }
        }
      }
      this.a.a(i.b, this.f);
      label105:
      label106:
      if (m == 0) {
        if (this.e == null)
        {
          this.a.j(i.a);
          if (m != 0) {
            break label158;
          }
          if (!bool) {
            break label148;
          }
        }
      }
      this.a.a(i.a, this.e);
      label148:
      this.d = null;
      this.e = null;
      label158:
      this.f = null;
    }
  }
  
  public void g()
  {
    if ((j.v != 0) || (this.b != null)) {
      c(true);
    }
  }
  
  public void h()
  {
    int m = j.v;
    if ((m != 0) || (this.b != null))
    {
      if (m == 0) {
        if (this.g != null)
        {
          if (m != 0) {
            break label57;
          }
          this.a.a(i.d, this.g);
          if (!j.u) {
            return;
          }
        }
      }
      label57:
      this.a.j(i.d);
    }
  }
  
  public void i()
  {
    int m = j.v;
    if ((m != 0) || (this.b != null))
    {
      if (m == 0) {
        if (this.h != null)
        {
          if (m != 0) {
            break label57;
          }
          this.a.a(i.e, this.h);
          if (!j.u) {
            return;
          }
        }
      }
      label57:
      this.a.j(i.e);
    }
  }
  
  public void j()
  {
    if ((j.v != 0) || (this.b != null)) {
      c(false);
    }
  }
  
  private void c(boolean paramBoolean)
  {
    int m = j.v;
    boolean bool = j.u;
    if (m == 0)
    {
      if (paramBoolean)
      {
        if (m != 0) {
          break label54;
        }
        this.i = new HashMap();
      }
    }
    else {
      if (!bool) {
        break label53;
      }
    }
    if (m == 0) {
      if (this.i == null) {
        return;
      }
    }
    label53:
    label54:
    w localw = this.a.v();
    do
    {
      do
      {
        if (!localw.e()) {
          break;
        }
        e locale = localw.d();
        ld localld = this.a.w(locale);
        b localb = localld.K();
        if (bool) {
          return;
        }
        if (localb != null) {
          if ((m != 0) || (paramBoolean))
          {
            if (m == 0)
            {
              if (localb.e())
              {
                localb.a(false);
                if (m != 0) {
                  continue;
                }
                if (!bool) {}
              }
              else
              {
                this.i.put(locale, Boolean.TRUE);
              }
            }
            else
            {
              if (m != 0) {
                continue;
              }
              if (!bool) {}
            }
          }
          else if (this.i.get(locale) != Boolean.TRUE) {
            localb.a(true);
          }
        }
        localw.f();
      } while (!bool);
    } while (m != 0);
    if (!paramBoolean) {
      this.i = null;
    }
  }
  
  public void k()
  {
    if (j.v == 0)
    {
      if (this.b != null)
      {
        e();
        b();
        c();
        g();
      }
    }
    else {
      d();
    }
  }
  
  public void l()
  {
    if (j.v == 0)
    {
      if (this.b != null)
      {
        j();
        h();
        f();
      }
    }
    else {
      i();
    }
  }
  
  public static class a_
    extends p
  {
    private final a.j.g c;
    private s d = new s(0.0D, 0.0D);
    public static int e;
    
    public a_(a.j.g paramg)
    {
      this.c = paramg;
    }
    
    public Object get(Object paramObject)
    {
      ld localld = this.c.w((e)paramObject);
      qe localqe = localld.L();
      if ((j.v != 0) || (localqe != null)) {
        return localqe.k();
      }
      return this.d;
    }
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.j.a.g

 * JD-Core Version:    0.7.0.1

 */